<ng-template #extra>

  <button nz-button nzType="primary" (click)="submit()">
    <i nz-icon nzType="save" nzTheme="outline"></i>
    保存
  </button>
</ng-template>

<nz-card nzTitle="Web" [nzExtra]="extra">

  <!-- <form nz-form [formGroup]="device-group" (ngSubmit)="submit()">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="port">端口</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="">
        <nz-input-number formControlName="port" [nzMax]="65535" [nzMin]="100"></nz-input-number>
      </nz-form-control>
    </nz-form-item> -->


    <form nz-form [formGroup]="group" (ngSubmit)="submit()">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="Addr">地址</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzHasFeedback [nzErrorTip]="AddrErrorTpl">
        <input nz-input name="Addr"    formControlName="Addr"/>
        <ng-template #AddrErrorTpl let-control>
          <ng-container *ngIf="control.hasError('required')">请输入地址信息!</ng-container>
        </ng-template>
      </nz-form-control>
    </nz-form-item>


    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="Gzip"  >压缩</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzHasFeedback  >
        <nz-switch [ngModel]="false"  name="Gzip"  formControlName="Gzip"></nz-switch>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="Cors"  >跨域</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzHasFeedback  >
        <nz-switch [ngModel]="false"  name="Cors"  formControlName="Cors"></nz-switch>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="Debug"  >调试</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24" nzHasFeedback  >
        <nz-switch [ngModel]="false"  name="Debug"  formControlName="Debug"></nz-switch>
      </nz-form-control>
    </nz-form-item>


  </form>
</nz-card>
